public class Codec535 {
//        Map<String,String>  mapInt = new HashMap<>() ;
//        Map<String, Integer> mapStr = new HashMap<>() ;
//        int hash = 0 ;
//
//    // Encodes a URL to a shortened URL.
//    public String encode(String longUrl) {
//        if(mapStr.containsKey(longUrl)){
//           return "http://tinyurl.com/" + mapStr.get(longUrl) ;
//        }else{
//            synchronized(this){
//             mapStr.put(longUrl , hash) ;
//             String  newStr = "http://tinyurl.com/" + hash ;
//             mapInt.put(newStr , longUrl) ;
//              hash ++ ;
//            }
//            return "http://tinyurl.com/" + mapStr.get(longUrl) ;
//        }
//    }
//
//    // Decodes a shortened URL to its original URL.
//    public String decode(String shortUrl) {
//         if(!mapInt.containsKey(shortUrl)){
//            return "" ;
//         }
//         return mapInt.get(shortUrl) ;
//    }
}

// Your Codec object will be instantiated and called as such:
// Codec codec = new Codec();
// codec.decode(codec.encode(url));